package com.yt.server.api;

import org.apache.mina.core.service.IoHandler;

public interface IServerHandler extends IoHandler {
	public static final String ID = "mina.server";

	public static final int TICK = 1000;
	public static final int TIMEOUT = 10000;

	// 等待
	public static final byte NOOP = 0x00;

	// 登陆
	public static final byte JOIN = 0x01;

	// 业务
	public static final byte SERVICE = 0x02;

	// 退出
	public static final byte EXIT = 0x04;

	enum Type {
		SERVER_CONNECT, 
		SERVER_DISCONNECT, 
		SERVER_SET_ATTRIBUTE, 
		SERVER_DELETE_ATTRIBUTE, 
		SERVER_SEND_MESSAGE, 
		CLIENT_CLEAR_DATA, 
		CLIENT_DELETE_ATTRIBUTE,
		CLIENT_DELETE_DATA, 
		CLIENT_INITIAL_DATA, 
		CLIENT_STATUS, 
		CLIENT_UPDATE_DATA, 
		CLIENT_UPDATE_ATTRIBUTE, 
		CLIENT_SEND_MESSAGE
	};
}
